home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
misc
/
npa931.zip
/
NPA.DOC
< prev
next >
Wrap
Text File
|
1993-03-27
|
29KB
|
644 lines
- NPA -
Numbering Plan Area
The Comprehensive Area Code
and Exchange Locator
<27Mar93>
(C) Copyright 1991-93
The PC Consultant
P.O. Box 42086
Houston TX 77242-2086
Ph. 713/826-2629 (v-mail no answer)
CIS 73670,1164
What does NPA do?
-----------------
NPA is a comprehensive area code and prefix locator. NPA stands for
Numbering Plan Area which is telephone company jargon for "area code".
NPA contains information for over 20,000 cities in the United States and
Canada. Such information includes:
* area code (NPA)
* state in USA or province in Canada
* local exchange or prefix (NXX)
* the city that NXX belongs to
* county that city resides in
* population of county
* pravelent zip code within NXX
* central office latitude and longitude of record for NXX (plus a
feature for instantly calculating mileage)
You can search based on State, NPA, city, NXX, and/or zip code. NPA
locates all cities that meet search criteria and outputs in one of several
formats to screen, printer, or file.
One of NPA's more useful features and, to our knowledge unique to NPA, is
the ability to locate the city of record for any phone number in the USA
or Canada. Imagine someone handing you a phone number, say 206/454-xxxx,
and then being able to tell them it's in Bellevue, Washington. And then
telling them the primary zip code is 98004. And while your at it, you
might mention that the city is located at 47.61 north latitude by 122.19
west longitude. And, oh yes, you can tell them how far in miles Bellevue
is from any city in the USA or Canada. Spokane? It's 222 miles away.
All cities in the USA and Canada that have their own central office
designation are included in NPA's data base. There are over 20,000 such
cities with over 50,000 NXX/Zip/LatLong entries. Even if a city does not
have it's own central office designation, it very likely shares one with a
nearby, perhaps larger, city.
How do I use NPA?
-----------------
NPA requires arguments, or search criteria, from you in order to perform
searches. There are two ways you can give these specifications to NPA.
(1) Using NPA's full screen input mode, or (2) on the DOS command line.
For DOS command line mode, see "Execute NPA from the command line" below.
If you just enter "NPA" on the DOS command line, then NPA displays a
screen prompting you for information. The screen is divided into two main
portions. The search specification portion and the help portion. The
search specification portion is depicted below:
┌─top──────────────────────────────────────────────────────────────────────────┐
│NPA - <ddmmmyy> (Numbering Plan Area) (C) 1991-93 PC Consultant│
│ │
│ 1st 2nd (Great Circle Mileage) │
│ State/Province/NPA: ····················· ····················· │
│ City/NXX: ····················· ····················· │
│ Min/Max # NXX: ··· / ··· │
│ │
│ ^Scan City ┌───Show───┐ ┌───────Show───────┐ Screen 7^Output │
│ Name ^County ^Pop ^NXX ^Zip ^Lat/Long ^Display to │
│ Yes Yes Yes Yes Yes Yes Scroll Screen │
≈ ≈
└─bottom───────────────────────────────────────────────────────────────────────┘
There are several input fields indicated by "······". The column marked
"1st" is used for retrieving information regarding your specification.
You'll use the 1st column most often. The column marked "2nd" is used
exclusively for calculating mileage between 1st and 2nd points. (For more
information, see "Calculating Mileage")
State/Province/NPA (input field)
The minimum required input for performing a search is a state, province,
or NPA. State/province may be the official two letter postal code or
portion of state/province name. Or you may specify just the NPA (area
code). Since there are nearly 150 NPA's but only 60+ states and
provinces, then a NPA search is a bit narrower. e.g. If you search for
the NNX 777 in CA, many different cities all having the 777 prefix are
located. Whereas if you search for 777 in just, say the 213 NPA, then
only Los Angeles is located. If two or more states are found to meet your
specification, NPA errors and advises you to narrow your search.
If you specify a "*" (wildcard) in the State/Province/NPA input field,
then all states and provinces are searched. The wildcard option does slow
the search a bit since 60+ state/provinces are searched instead of the
usual one. e.g. You can use this feature to find all cities in the USA
and Canada that start with 'Lake', etc.
City/NXX/Zip (input field)
Normally, NPA searches all cities within a state or province. However,
you can narrow NPA's search by specifying a city name (or portion
thereof), NXX, Zip.
If you specify a city name, then NPA will search all cities whose name
starts with the letters you specify here. e.g. "Hous" finds Houston but
"oust" does not. There is a way to make NPA search the entire name for
your specification.
If you specify a NXX, then NPA will search all cities having that NXX. If
you do specify a NXX, it must be a complete 3 digit NXX. Partial NXX name
searches are not permitted.
If you specify a zip code, then NPA will search for all cities having that
zip code. You may specify any number of digits for a zip code search
starting with the left-most digit. The more digits you specify, the
narrower the search. If you specify fewer than all five digits, you must
include a trailing * to indicate a wild card search. e.g. To search all
zip codes starting with 08, you'd say "08*".
NOTE: Even though you are performing a zip code search, you still MUST
include a state/province/NPA or * for state wild card. NPA does
not automatically search the entire data base for your zip code.
!!!!! The zip codes in this data base are APPROXIMATIONS only! There is
no one-to-one NXX-to-zip code geography. The zip code search is
included strictly as a *convenience feature* and must be considered
as only a best-guess.
Min/Max # NXX (input field)
To minimize output, NPA normally displays only cities having a certain
minimum number of NXXs. NPA decides what the minimum should be based on
how wide or narrow your search specification is. Generally, the wider the
search, the more NNXs the city must contain before NPA will consider it
for display. NPA does this to avoid massive data retrievals. Below shows
the default that NPA uses based on your search specification:
Specify state or province only: 10 NXX minimum, no maximum default
Specify a NPA only: 5 NXX minimum, no maximum default
Specify a city or NXX also: 1 NXX minimum, no maximum default
As you can see, the minimum NXX default lowers as you narrow your search.
This ensures the greatest chance of finding your requested data without
unnecessarily flooding you with output.
You can easily override these defaults by specifying your own minimum
and/or maximum NXX requirement.
Switches (control display)
In addition to the data input fields, there are eight switches. Six of
these eight are two-state switches. The other two are multi-state
switches. Notice that each switch has a caret ^ preceeding the switch
name. The caret means to touch and hold the Ctrl key then touch the
letter that appears immediately to the right. Then release both keys.
The following six two-state switches control what NPA displays in addition
to the state and city (state and city name is always displayed). Some
switches change other switches, where noted.
^Scan City Name:
Yes : NPA searches the entire city name for a match. e.g. Both "Hous"
and "oust" finds Houston.
No : NPA searches the beginning of the city name for a match. e.g.
"Hous" finds Houston, but "oust" does not.
^County (Show)
Yes : Also displays the county in which city resides
No : Does not show county.
^Pop (Show)
Yes : Also displays last recorded population for county. This switch
forces the ^County switch to Yes.
No : Does not show population.
^NXX (show)
Yes : Also displays all NXXs within city.
No : Does not show NXXs.
^Zip (show)
Yes : Also displays the most pravalent zip code associated with NXX.
(Note: There is *not* a one-to-one ZIP-to-NXX mapping. The zip
displayed must be considered best-guess.) This switch forces
the ^NXX switch to yes.
No : Does not show zip codes.
^Lat/Long (show)
Yes : Also displays the latitude and longitude associated with NXX.
This switch forces the ^NXX switch to yes.
No : Does not show latitude/longitude.
Please experiment with these switches to learn how they affect the output.
The following two multi-state switches control how and where NPA displays
output.
^Display (screen)
Scroll: NPA displays output in a scrollable buffer that allows
forward and backward navigation. This makes detailed
perusal much easier.
PagePause: Displays output in a forward-only fashion with pauses at
every screenful. In this mode, NPA displays output in real
time as it's culled from the data base rather than building
a scrollable output buffer. A tad faster but not as useful.
NonStop: Same as PagePause but with no pauses. NPA continually
displays output until it's done.
^Output to
Screen: NPA displays output to the monitor according to the setting of
the ^Display switch.
Printer: NPA prints output to LPT1 using the same display format as on
the screen. When Printer is selected, a new field appears
prompting you for width. Valid range is 79 upto 255. To
print to LPT2 or LPT3, choose "Output to File" then enter
LPT2 or LPT3 as the file name.
File: NPA writes output to a file using the same display format as
the on screen. When File is selected, a new field appears
prompting you for a file name. The width field, described
above, also appears but with a maximum of 999 instead of 255.
If necessary, you can print to LPT1, LPT2, or LPT3 from this
prompt in which case the default max columns returns to 255.
Function/Action Keys
NPA has several function keys available only in full screen input mode.
F1 (Help) Display context sensitive help. You can browse through or
touch the highlighted character appearing next to each item
for context sensitive help.
F2 (PrvSpec) Recalls upto the last 20 arguments entered since NPA was
executed.
F3 (NxtSpec) Same as F1, but moves forward through argument history
buffer instead of backward as F1 does.
F4 (ClrSpec) Clears all input fields.
F5 (ClrFld) Clears input field that cursor is in.
F6 (SavOpts) Save all current switch settings (except ^Output) to a
defaults file. Next time NPA is executed, the defaults file
is read and switches set accordingly.
Esc (Cancel) Cancel current operation. The Esc key generally takes you
back to where you were prior to hitting enter. Esc works at
any time during execution.
Calculating Mileage
NPA can calculate the great circle mileage between any two cities located
in the data base. If you were to take an imaginary length of string and
travel the shortest possible route from point a to point b, the length of
the string would be the great circle distance. It is the arc distance.
Hence the name, Great Circle.
By specifying parameters for both the 1st and 2nd input areas, you can
calculate the mileage between any two points in the data base.
You can specify either an NPA/NXX or state/city as either point.
Specifying an NPA/NXX sets the point of calculation to the portion of the
city served by that NXX. Specifying a state/city sets the point of
calculation of the approximate center of the city. e.g.
npa tx.houston 2nd:tx.austin
Shows the distance between the approximate centers of these cities.
npa 713.222 2nd:512.206
Shows the distance between NPA/NXX 713.222 (Houston) and NPA/NXX
512.206 (Austin).
Brief lat/long tutorial
The lat/long data is precise to approximately 36 arc seconds (two decimal
places, x.xx). This equals about .7 miles deg longitude and .7 miles deg
latitude at 90 deg longitude.
The miles per degree latitude remain constant along a longitudinal vector
while the miles per degree longitude change as a function of latitude
along a latitudinal vector.
e.g. At 90 deg longitude, each degree along a latitudinal vector is about
69 miles. At 0 or 180 deg longitude, each degree along a latitudinal
vector is 0 miles. (indeed, you can stand on all 24 time zones at once!)
Executing NPA from the command line
Most NPA functions that are available in the full screen input mode are
also available from the DOS command line -- plus one that isn't available
in full screen input mode. The rules are identical to those in full
screen input mode. Therefore, only command line syntax will be explained.
Syntax for executing NPA from the DOS command line:
NPA (state|npa)[.city|.nxx|.zip] [2nd:state|npa.city|nxx] [min=x] [max=x]
[-pp] [-ns] [-co] [-lat] [-pop] [-s] [-x] [-nxx] [-zip] [-25] [-50]
[-bw] [file=] [width=]
Where:
( ) = Required Parameter.
[ ] = Optional Parameter.
| = Choose one from list of choices within ( ) or [ ].
state = Two letter postal code or portion of state name. NPA will first
search for postal code. If postal code search fails, NPA will
automatically perform a search by name.
npa = Numbering Plan Area (AreaCode). NPA will search for states and
provinces assigned this NPA.
.city = Narrow state search to cities whose name starts with
specification. e.g. TX.hou will find Houston.
.nxx = Show cities in state or NPA having this NXX. NXX means local
exchange or prefix, e.g. (NPA)NXX-nnnn.
2nd: = Calculate the distance, in miles, between the the first
state/npa, city/nxx and the state/npa, city/nxx specified here.
min=x = Display only cities with at least x number of NXXs. If not
specifed, then normal default minimum is 10.
max=x = Display only cities with at most x number of NXXs. If not
specifed, then the maximum is infinite.
Some switches have a trailing (-) that can be used to force the switch
off. Used to override a switch setting from the NPA_SWITCH environment
variable or from the defaults file. In essence, -foo- does the exact
opposite of -foo (whatever foo may be).
-pp = Display output using page pause mode. Do not use the scrollable
buffer. NPA normally displays findings in a scrollable buffer
allowing you to scroll up/down for easy perusal. The buffer is
stored on disk, so a large NPA output may take a moment to
complete queuing. (-pp- force cancel)
-ns = Continuous, don't pause. NPA normally pauses every screenful.
Switch is only meaningful if used with -pp. (-ns- force cancel)
-co = Display county that city is located in. (-co- force cancel)
-lat = Show latitude and longitude for each displayed NXX. This switch
can potentially generate copious output. Use only with narrow
search specification. Forces switch -x on. (-lat- force
cancel)
-pop = Display approximate county-wide population. Switch -co forced
on when this switch is used. (-pop- force cancel)
-s = Used with '.city'. Causes NPA to search anywhere within city
name. e.g. 'npa tx.oust -s' will locate Houston TX. Without
the -s, you'd have to specify 'npa tx.hous' to locate Houston
since the search is performed only from the first letter. The
-s switch is useful, for example, to locate all cities having
the word 'lake' in it's name. (-s- force cancel)
-x = Also display NXXs (prefixes). Output display can be rather
lengthy when using this switch. (-x- force cancel)
-nxx = Same as -x. -nxx was added to be consistent with the other,
more descriptive switch names. -x was included to assist
current customers.
-zip = Show primary zip code for each displayed NXX. There is not a
one-to-one NXX-to-zip code mapping. This just shows the most
pravalent zip for a given NXX. As with -lat, this switch may
generate copious output. (-zip- force cancel)
-25 = Force 25 line mode if screen is not already.
-50 = Force 50 line mode. Note: The -25/-50 switch works only when
specified on the NPA command line at the DOS prompt. If -25/-50
is the *only* argument on the NPA command line, then NPA enters
Full Screen Query Mode with the lines-per-screen specified.
file= = If you specify a file name or printer port, NPA will write to
that file/device instead of the screen. NPA will overwrite an
existing file without warning so be sure your file name is
unique. Valid printer ports are LPT1, LPT2, and LPT3.
width= = Specify width of output here. Default is 79. For printer, the
max is 255. For file, the max is 999.
If an parameter must contain an embedded space, then the entire parameter
must be enclosed in double quotes.
Examples of DOS command line execution:
npa ca.san
- shows all cities in California starting with 'san'.
npa "tx.san antonio" -x
- shows the city of San Antonio in Texas along with prefixes. Note
that since San Antonio has a space in the name, the entire parameter
is enclosed in double quotes.
npa 703 -x
- shows cities in virginia (703 area code only) with prefixes.
npa tx.austin 2nd:fl.miami
- shows distance between Austin, TX and Miami, FL.
npa "ca.san francisco" "2nd:ca.san jose"
- shows distance between San Francisco, CA and San Jose, CA.
Note that since San Francisco and San Jose have spaces in the name,
the entire parameter(s) is enclosed in double quotes.
npa "new mex"
- shows NPAs and larger cities in New Mexico. Note that since New
Mexico has a space in the name, the entire parameter is enclosed in
double quotes.
npa nebra -co
- shows NPAs and larger cities/counties in Nebraska.
MISCELLANEOUS NOTES:
Some cities, especially in Canada, abbreviate 'saint' using either 'st'
(masculine form) or 'ste' (feminine form). Sometimes it's difficult to
know which gender form to use as French names can be pretty elaborate
obscuring gender from an American audience. To help eliminate this
confusion, all 'ste.' forms were truncated to 'st' (without the period).
Some cities are quite close together. If NPA does not find your city
(even with 'min=1') then double check your spelling. If your city is
spelled correctly and still it's not found, then that city does not have
it's own central office designation but likely shares a central office
with a nearby (perhaps larger) city.
Defaults File
When using NPA in full screen mode, you'll notice that F6 (SavOpts) is
available. When F6 is touched, all the two-state switches and the
^Display mode switch is saved in the defaults file (called DEFAULTS.DAT)
located in the same subdirectory with the data base files. Next time NPA
is started, the switch states are recalled (even if the next execution is
in DOS command line mode). You can erase the defaults file, if necessary,
to reset NPA. NPA automatically recreates the file next time F6 is
touched.
The switch settings in the defaults file overrides the switch settings on
the NPA_SWITCH environment variable. In either case, you can change a
switch in full screen mode or in DOS command line mode regardless of
wether it's set via the defaults file or the NPA_SWITCH variable.
To force a switch change in full screen mode, simply touch-hold Ctrl and
touch the letter after the caret (^). In DOS mode, simply specify the
switch to force-set (-foo) or force-clear (-foo-).
ENVIRONMENT VARIABLES
NPA utilizes several environment variables. They are:
npa_data - Location of data base files.
npa_switch - Contains switches for NPA to use automatically
without having to specify each time.
NPA_DATA environment variable.
You undoubtedly noticed the voluminous quantity of NPA_DATA.* files. The
database is broken up by states and provinces to make searches faster. By
placing the data files in their own directory, they'll stay out of the
way.
NPA has three methods of accessing it's data files. They happen in the
following order.
1) NPA_DATA environment variable. if no find, then...
2) Current directory. if no find, then...
3) Regular DOS path. if no find, error...
The first method that finds the data files is the one used during this
execution. It is recommended that you place the NPA_DATA files in their
own subdirectory then using method #1, the 'npa_data' environment
variable.
Suppose you have a subdirectory called 'c:\npa'. You can configure NPA to
always look there regardless of what drive or directory is current by
simply using the environment variable command:
set npa_data=c:\npa
You should place this command in your autoexec.bat file or other batch
file that gets executed at system boot.
NPA_SWITCH environment variable.
If you frequently (or always) use particular switches when executing NPA,
then you may store those switches in an environment variable called
NPA_SWITCH. Once stored, those switches will always take effect when
executing NPA without you having to specify them.
The following switches are valid in the NPA_SWITCH environment variable.
Refer to DOS Command line instruction for details on switches
-25 force 25 line mode
-50 force 50 line mode (vga only)
-s scan city name
-co also display county
-pop also display county population
-x also display nxx
-nxx same as -x
-zip also display zip code
-lat also display latitude/longitude
-pp output in line mode, with pause at each screenful
-ns used with -pp, don't pause
-bw black and white mode, for monochrome/lcd/gas plasma displays
All switches except -25, -50, and -bw can be forced-cleared by following
it with another hyphen, e.g. -co- forces county names *not* to be
displayed. Example:
set npa_switch=-co-x
Switch settings stored in the defaults file (by touching F6) take
precendence over the NPA_SWITCH variable.
LICENSING
NPA, like many other programs, flies under the shareware banner. If you
like and use NPA, then *please* register.
New versions are periodically released that contain updated database
information as well as new features. Registering will ensure your
notification of these new releases.
You can register by mail using check/money order/Visa/MC. Or you can
register by telephone using Visa/MC. Either way, you'll receive the two
keys (discussed in the BRAND.DOC file) necessary to brand NPA as
registered.
If you register by telephone, you can get the registration keys a bit
sooner. I'm generally away from the office so voice-mail will pick up.
You may register via voice-mail and the system will page me thus allowing
me to return your call within a few minutes. The system will page me
immediately if your message is left during the following hours: Mon-Fri
7a-10p, Sat-Sun 9a-10p CST/CDT.
If you desire to register by phone and voice-mail picks up, please leave
the following information:
1. The name to register. Please spell it out. The name
must reasonably match the card holder's name.
2. Address so the PCC can mail you the license, receipt, and diskette
if you are registering an older version. Specify diskette size.
3. The credit card number.
4. The expiration date.
If you simply prefer not to register via voice-mail, that's fine. I'll
certainly call you back. But using voice-mail will speed the order since
everything will be ready to go upon call back.
The registration fee is twenty five dollars. The PC Consultant will
process the order and return your call promptly.
PC Consultant
P.O. Box 42086
Houston TX 77242-2086
Ph. 713/826-2629 (v-mail no answer)
Thank you for using NPA and for registering if you like it!
* Great Circle algorithm for calculating mileage between two lat/longs
courtesy RSGB - Radio Society of Great Britain
-=*=- Other products offered by the PC Consultant -=*=-
* TimeLock *
TimeLock is a DOS-based memory resident security utility that locks the PC
keyboard after a user pre-specified period of inactivity, thereby
protecting a sensitive LAN/mainframe userid or application program from
spying eyes and curious fingers while you are away. An invaluable
addition to your company's PC security arsenal!
Branches of the US, Canadian, and Australian government trust TimeLock as
do many private and public companies.
TimeLock can be instantly locked via hot-key, batch file, or through
keyboard inactivity. The *only* way to regain access to the PC once the
keyboard is locked is by entering your secret password. Otherwise the PC
must be cold-booted. And that, of course, will terminate your sensitive
LAN/mainframe connection -- protecting your userid from intrusion!
TimeLock is written entirely in assembly language for optimum speed and
size. Uses less than 3K RAM!
Please telephone at the above number for more details on TimeLock. If you
are a corporate network administrator in charge of company PCs or PC
products manager charged with software evaluation and recommendation, I'll
send you a diskette free of charge so you can evaluate TimeLock for
yourself.
Once again, thank you for choosing software by the PC Consultant!